package com.tech.zhidengxian.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tech.zhidengxian.model.dataobject.CosDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CosMapper extends BaseMapper<CosDO> {
    default List<CosDO> queryOssList(){
        LambdaQueryWrapper<CosDO> wrapper = new LambdaQueryWrapper<>();
        return selectList(wrapper);
    }
    default int deleteByName(String name){
        LambdaQueryWrapper<CosDO> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CosDO::getName,name);
        return delete(wrapper);
    }
}
